package com.itheima.security.distributed.order.controller;

import com.itheima.security.distributed.order.annotatioin.PreAuth;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @version 1.0
 **/
@RestController
public class OrderController {

    @GetMapping(value = "/r1")
    @PreAuth("hasRole('p1')")
    public String r1(){
        System.err.println("拥有p1权限方可访问此url");
        return "授权通过,访问资源服务成功";
    }

}